﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MyHealthByDesign.Domain;
using System.Collections.Specialized;

namespace MyHealthByDesign.Views
{
    public partial class DynamicResults : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Dictionary<Question, NameValueCollection> formPost = (Dictionary<Question, NameValueCollection>)Session["PostValues"];

            foreach (var item in formPost)
            {
                NameValueCollection nvc = (NameValueCollection) item.Value;
                for (int i = 0; i < nvc.Count; i++)
                {
                    Response.Write(string.Format("[{0}] : {1} - {2}", item.Key.ContentLabel, nvc.GetKey(i),
                                                 nvc.Get(i)));
                    Response.Write("<br />");
                }
            }
        }
    }
}